<template>
  <div>
    <div class="houseber" v-if="noticeList.length == 0">
      <img src="../../../assets/img4.png" alt="" />
      系统消息 : 感谢您的关注！
    </div>
    <div class="block" v-else>
      <!-- <span class="demonstration">默认 Hover 指示器触发</span> -->
      <el-carousel height="30px" arrow="never" indicator-position="none">
        <el-carousel-item v-for="item in noticeList" :key="item.id">
          <div class="small houseber" @click="listShow(item.id)">
            <img src="../../../assets/img4.png" alt="" />{{ item.title }}
          </div>
        </el-carousel-item>
      </el-carousel>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      noticeList: [
        { id: 1, title: "qwe" },
        { id: 2, title: "qqq" },
        { id: 3, title: "ww" },
        { id: 4, title: "qsadsde" },
      ],
    };
  },
  methods: {
    listShow(row) {
      console.log(row);
    },
  },
};
</script>

<style>


.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
/* .el-carousel__indicator--horizontal{
  display: none
} */
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
}
.houseber {
  /* border: 1px solid red; */
  padding: 5px 10px;
}
.houseber img {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}
</style>